<!DOCTYPE html>
<html lang="en">

<head>
    <meta charset="UTF-8">
    <meta name="viewport" content="width=device-width, initial-scale=1.0">
    <meta http-equiv="X-UA-Compatible" content="ie=edge">
    <title>padding</title>

    <style>
        div {
            width: 500px;   
            height: 100px;
            margin: 0 auto;
        }

        div a {
            display: block;
            width: 100px;
            height: 100px;
            background: url(image/logo2.jpg) no-repeat;
            background-size: 100px 100px;
        }

        div a h1 {
            height: 0;
            padding-top: 100px;
            text-indent: -8888px;
        }
    </style>
</head>

<body>
    <div>
        <a href="#" title="a标签">
            <h1>这是一个h1标签哦</h1>
        </a>
    </div>
</body>

</html>